﻿@model UCosmic.Www.Mvc.Areas.Identity.Models.SignIn.SignInNavInfo
<div class="identity">
    @if (Model.IsSignedIn)
    {
        <a href="@Url.Action(MVC.Identity.Self.Me())" class="signed-in">@User.Identity.Name</a>
        <span class="pipe">|</span>
        <a href="@Url.Action(MVC.Identity.SignIn.SignOut(Request.RawUrl))">Sign Out</a>
        if (Model.IsImpersonating)
        {
        <span class="pipe">|</span>
        <a href="@Url.Action(MVC.Identity.SignIn.UndoSignInAs(Request.RawUrl))" class="sign-out">
            @Model.WasSignedInAs</a>
        }
        if (Model.IsImpersonator || Model.IsImpersonating)
        {
        <span class="pipe">|</span>
        <a href="@Url.Action(MVC.Identity.SignIn.SignInAs())">Impersonate</a>
        }
    }
    else
    {
        <a href="@Url.Action(MVC.Identity.SignIn.SignIn(Request.RawUrl))" class="sign-in">Sign
            In</a> 
        <span class="pipe">|</span>
        <a href="@Url.Action(MVC.Identity.SignUp.SendEmail())" class="sign-up">Sign Up</a>
    }
</div>
